//
//  WANavigationController.h
//
//  WoW Atlas, a World of Warcraft instance map, loot, and achievement browser.
//  Copyright 2010 Steven Mattera <stevenmattera@gmail.com>
//
//	Special Thanks to Dan Gilbert and the Atlas/Atlasloot Team.
//
//	WoW Atlas is free software; you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation; either version 2 of the License, or
//	(at your option) any later version.
//
//	WoW Atlas is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRENTY; without even the implied warrenty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//	GNU General Public License for more deails.
//
//	You should have received a copy of the GNU General Public License
//	along with WoW Atlas; if not, write to the Free Software
//	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//

#import "WANavigationBar.h"
#import "WANavigationItem.h"

@protocol WANavigationControllerDelegate;
@interface WANavigationController : UIViewController {
	UIView * _containerView;
	WANavigationBar * _navigationBar;
	UIView * _navigationTransitionView;
	
	NSMutableArray * _viewControllers;
	UIViewController * _disappearingViewController;
	
	id <WANavigationControllerDelegate> _delegate;
}

- (id)initWithRootViewController:(id)controller;

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (void)popViewControllerAnimated:(BOOL)animated;
- (void)popToViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (void)popToRootViewControllerAnimated:(BOOL)animated;

- (UIViewController *)topViewController;
- (UIViewController *)visibleViewController;

- (BOOL)navigationBarHidden;
- (void)setNavigationBarHidden:(BOOL)hidden animated:(BOOL)animated;
- (WANavigationBar *)navigationBar;

@property (nonatomic, retain) id <WANavigationControllerDelegate> delegate;

@end

@protocol WANavigationControllerDelegate <NSObject>

- (void)navigationController:(WANavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (void)navigationController:(WANavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated;

@end

@interface UIViewController (WANavigationControllerItems)

@property(nonatomic,readonly,retain) WANavigationItem * customNavigationItem;
@property(nonatomic,readonly,retain) WANavigationBar * customNavigationController;

@end